/*
 * @Author: xuxu12138 1718324422@qq.com
 * @Date: 2023-08-29 09:46:07
 * @LastEditors: xuxu12138 1718324422@qq.com
 * @LastEditTime: 2023-09-06 10:10:26
 * @FilePath: /things-admin/src/main.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.

import { store } from '@/store/Store';
import Vue from 'vue';
import app from '@/app.vue';
import { router } from '@/config/Router';
import ViewUI from 'view-design';
import 'view-design/dist/styles/iview.css';
import { settings } from '@/config/Settings';
import '@/index.less';
import '@/asset/icons/iconfont.css';
import iviewAreaDesign from 'iview-area-design';
import Component from 'vue-class-component';
import echarts from 'echarts';
import china from 'echarts/map/json/china.json';
// import {DeviceModelAll} from '@/base/entity/device-model-all';
import moment from 'moment';
import { request } from '@/base/Request';
import { Validation } from '@/base/Validation';
import AppButton from './component/AppButton.vue';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';


Vue.use(ElementUI);

Vue.prototype.$echarts = echarts;
echarts.registerMap('china', china);

// 实际打包时应该不引入mock
Vue.use(ViewUI);
Vue.use(iviewAreaDesign);

/**
 * @description 全局配置提示信息
 */
Vue.prototype.$Message.config({
  top: 100,
  duration: 3
});

Vue.prototype.$moment = moment; // 赋值使用
/**
 * @description 生产环境关掉提示
 */
Vue.config.productionTip = false;
/**
 * @description 全局注册应用配置
 */
Vue.prototype.$config = settings;
/**
 * 注册指令
 */

Component.registerHooks([
  'beforeRouteEnter',
  'beforeRouteLeave',
  'beforeRouteUpdate'
]);
Vue.component('AppButton', AppButton);

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  render: h => h(app)
});

// request.get(String, `/api/demo/echo/hello`).then(x => {
//   console.log('=========', x);
// });
